<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

Route::group( function () {


// 定义index模块的路由
    Route::group('shop', function () {
        Route::group('Auth.'  )->namespace('app\shop\controller\auth') ;
        Route::group('appsetting.')->namespace('app\shop\controller\appsetting');
        Route::group('data.')->namespace('app\shop\controller\data');
        Route::group('file.')->namespace('app\shop\controller\file');
        Route::group('order.')->namespace('app\shop\controller\order');
        Route::group('page.')->namespace('app\shop\controller\page');
//        Route::group('plus.agent.')->namespace('app\shop\controller\plus\agent');


        $arr = ['advance','agent','article','assemble','bargain','card','coupon','invitation','live','points','seckill','surface','table'];
        for ($i = 0; $i < sizeof($arr) ; $i++) {
            Route::group('plus.'.$arr[$i].'.' )->namespace('app\shop\controller\plus\\' .$arr[$i]);
        }
        Route::group('plus.',function (){
        })->namespace('app\shop\controller\plus');
        Route::group('product.')->namespace('app\shop\controller\product');
        Route::group('setting.')->namespace('app\shop\controller\setting');
        Route::group('statistics.')->namespace('app\shop\controller\statistics');
        Route::group('store.')->namespace('app\shop\controller\store');
        Route::group('user.')->namespace('app\shop\controller\user');

    })->namespace('app\shop\controller') ;

// 定义admin模块的路由
    Route::group('admin', function () {
        Route::group('file.')->namespace('app\admin\controller\file');
        Route::group('plus.')->namespace('app\admin\controller\plus');
        Route::group('admin.')->namespace('app\admin\controller\admin');
    })->namespace('app\admin\controller');

});







